package cwb1;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Amount extends Achievement{
	
	// The amount to reach.
	private long amountToReach;
	// The one word description of the amount.
	private String amountDescriptionShort;
	
	public Amount(String achievementName, long achievementNumber, String achievementDescription,long amountToReach, long option, Date startDate, Date stopDate, long eventType, String amountDescriptionShort)
    {
        super(achievementName, achievementNumber, achievementDescription, AchievementFactory.AMOUNT, amountToReach, option, startDate, stopDate, eventType);
        this.amountToReach = amountToReach;
        this.amountDescriptionShort = amountDescriptionShort;
        
    }
	
	public Amount(Map<String, Object> properties) 
	{
	    super(properties);
	    setAchievementType(AchievementFactory.AMOUNT);
	    amountToReach = (Long) properties.get("amountToReach");
	    amountDescriptionShort = (String) properties.get("amountDescriptionShort");
	}
	
	public HashMap<String,Object> getProperties() {
    	HashMap<String, Object> properties = super.getProperties();
    	properties.put("amountToReach", amountToReach);
    	properties.put("amountDescriptionShort", amountDescriptionShort);
    	
    	return properties;
    }
	
	public long getAmountToReach()
	{
		return amountToReach;
	}
	
	public void setAmountToReach(long amountToReach)
	{
		this.amountToReach = amountToReach;
	}
	
	public String getAmountDescriptionShort()
	{
		return amountDescriptionShort;
	}
	
	public void setAmountDescriptionShort(String amountDescriptionShort)
	{
		this.amountDescriptionShort = amountDescriptionShort;
	}
	
}